Optimal. Leaf size=74 \[ -\frac{a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac{b e n \log (d+e x)}{f (d f-e g)}+\frac{b e n \log (f x+g)}{f (d f-e g)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0830582, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.148, Rules used = {2412, 2395, 36, 31} \[ -\frac{a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac{b e n \log (d+e x)}{f (d f-e g)}+\frac{b e n \log (f x+g)}{f (d f-e g)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2412
Rule 2395
Rule 36
Rule 31
Rubi steps
\begin{align*} \int \frac{a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac{g}{x}\right )^2 x^2} \, dx &=\int \frac{a+b \log \left (c (d+e x)^n\right )}{(g+f x)^2} \, dx\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac{(b e n) \int \frac{1}{(d+e x) (g+f x)} \, dx}{f}\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac{(b e n) \int \frac{1}{g+f x} \, dx}{d f-e g}-\frac{\left (b e^2 n\right ) \int \frac{1}{d+e x} \, dx}{f (d f-e g)}\\ &=-\frac{b e n \log (d+e x)}{f (d f-e g)}-\frac{a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac{b e n \log (g+f x)}{f (d f-e g)}\\ \end{align*}
Mathematica [A] time = 0.0687515, size = 57, normalized size = 0.77 \[ \frac{\frac{b e n (\log (d+e x)-\log (f x+g))}{e g-d f}-\frac{a+b \log \left (c (d+e x)^n\right )}{f x+g}}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.314, size = 354, normalized size = 4.8 \begin{align*} -{\frac{b\ln \left ( \left ( ex+d \right ) ^{n} \right ) }{ \left ( fx+g \right ) f}}-{\frac{-i\pi \,beg{\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}+i\pi \,bdf{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}-i\pi \,beg{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}+i\pi \,bdf{\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}+i\pi \,beg \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{3}+i\pi \,beg{\it csgn} \left ( ic \right ){\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ){\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) -i\pi \,bdf \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{3}-i\pi \,bdf{\it csgn} \left ( ic \right ){\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ){\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) +2\,\ln \left ( ex+d \right ) befnx-2\,\ln \left ( -fx-g \right ) befnx+2\,\ln \left ( ex+d \right ) begn-2\,\ln \left ( -fx-g \right ) begn+2\,\ln \left ( c \right ) bdf-2\,\ln \left ( c \right ) beg+2\,adf-2\,aeg}{ \left ( 2\,fx+2\,g \right ) f \left ( df-eg \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.10073, size = 116, normalized size = 1.57 \begin{align*} -b e n{\left (\frac{\log \left (e x + d\right )}{d f^{2} - e f g} - \frac{\log \left (f x + g\right )}{d f^{2} - e f g}\right )} - \frac{b \log \left ({\left (e x + d\right )}^{n} c\right )}{f^{2} x + f g} - \frac{a}{f^{2} x + f g} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.03052, size = 215, normalized size = 2.91 \begin{align*} -\frac{a d f - a e g +{\left (b e f n x + b d f n\right )} \log \left (e x + d\right ) -{\left (b e f n x + b e g n\right )} \log \left (f x + g\right ) +{\left (b d f - b e g\right )} \log \left (c\right )}{d f^{2} g - e f g^{2} +{\left (d f^{3} - e f^{2} g\right )} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30473, size = 150, normalized size = 2.03 \begin{align*} \frac{b f n x e \log \left (f x + g\right ) - b f n x e \log \left (x e + d\right ) + b g n e \log \left (f x + g\right ) - b d f n \log \left (x e + d\right ) - b d f \log \left (c\right ) + b g e \log \left (c\right ) - a d f + a g e}{d f^{3} x - f^{2} g x e + d f^{2} g - f g^{2} e} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]